import tushare as ts
import pandas as pd

# pro = ts.pro_api('bc2b1e6f55a46e575a2109d1c846e7b262996df3e274bc9b9676acca')
# #
# df = pro.query('trade_cal', exchange='', start_date='20180901', end_date='20181001', fields='exchange,cal_date,is_open,pretrade_date', is_open='0')
# #
# df.to_sql()

# df = ts.get_hist_data('000001')
# df.to_excel('D:\一些数据.xlsx')
# print(ts.__version__)
pro = ts.pro_api('bc2b1e6f55a46e575a2109d1c846e7b262996df3e274bc9b9676acca')

data = pro.stock_basic(exchange='', list_status='L', fields='ts_code,symbol,name,area,industry,list_date')
print(data)
